<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_35) on Mon Feb 18 13:12:27 EET 2013 -->
<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
<TITLE>
XMLParser (LWUIT for Series 40)
</TITLE>

<META NAME="date" CONTENT="2013-02-18">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="XMLParser (LWUIT for Series 40)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/XMLParser.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/sun/lwuit/xml/XMLParser.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="XMLParser.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.sun.lwuit.xml</FONT>
<BR>
Class XMLParser</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.sun.lwuit.xml.XMLParser</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>XMLParser</B><DT>extends java.lang.Object</DL>
</PRE>

<P>
The parser class is used to parse an XML document into a DOM object (Element).
<P>

<P>
<HR>

<P>

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#XMLParser()">XMLParser</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs the XMLParser</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#addCharEntitiesRange(java.lang.String[], int)">addCharEntitiesRange</A></B>(java.lang.String[]&nbsp;symbols,
                     int&nbsp;startcode)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the given symbols array  to the user defined char entities table with the startcode provided as the code of the first string, startcode+1 for the second etc.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#addCharEntity(java.lang.String, int)">addCharEntity</A></B>(java.lang.String&nbsp;symbol,
              int&nbsp;code)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the given symbol and code to the user defined char entities table
 http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#attribute(java.lang.String, java.lang.String, java.lang.String)">attribute</A></B>(java.lang.String&nbsp;tag,
          java.lang.String&nbsp;attributeName,
          java.lang.String&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoked for every attribute value of the givne tag
 This callback method is invoked only on the eventParser.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#convertCharEntity(java.lang.String)">convertCharEntity</A></B>(java.lang.String&nbsp;charEntity)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts a char entity to the matching character.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;com.sun.lwuit.xml.Element</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#createNewElement(java.lang.String)">createNewElement</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;com.sun.lwuit.xml.Element</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#createNewTextElement(java.lang.String)">createNewTextElement</A></B>(java.lang.String&nbsp;text)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new text element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#endTag(java.lang.String)">endTag</A></B>(java.lang.String&nbsp;tag)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoked when a tag ends
 This callback method is invoked only on the eventParser.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#eventParser(java.io.Reader)">eventParser</A></B>(java.io.Reader&nbsp;r)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The event parser requires deriving this class and overriding callback
 methods to work effectively.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#getSupportedStandardName()">getSupportedStandardName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a string identifying the document type this parser supports.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#isEmptyTag(java.lang.String)">isEmptyTag</A></B>(java.lang.String&nbsp;tagName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether the specified tag is an empty tag</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#isSupported(com.sun.lwuit.xml.Element)">isSupported</A></B>(com.sun.lwuit.xml.Element&nbsp;element)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if this element is supported, false otherwise
 In XMLParser this always returns true, but subclasses can determine if an element is supported in their context according to its name etc.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#isWhiteSpace(char)">isWhiteSpace</A></B>(char&nbsp;ch)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the specified character is a white space or not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#notifyError(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String)">notifyError</A></B>(int&nbsp;errorId,
            java.lang.String&nbsp;tag,
            java.lang.String&nbsp;attribute,
            java.lang.String&nbsp;value,
            java.lang.String&nbsp;description)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A utility method used to notify an error to the ParserCallback and throw an IllegalArgumentException if parsingError returned false</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;com.sun.lwuit.xml.Element</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#parse(java.io.Reader)">parse</A></B>(java.io.Reader&nbsp;is)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the entry point for parsing a document and the only non-private member method in this class</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;com.sun.lwuit.xml.Element</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#parseCommentOrXMLDeclaration(java.io.Reader, java.lang.String)">parseCommentOrXMLDeclaration</A></B>(java.io.Reader&nbsp;is,
                             java.lang.String&nbsp;endTag)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This utility method is used to parse comments and XML declarations in the XML.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;com.sun.lwuit.xml.Element</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#parseTag(java.io.Reader)">parseTag</A></B>(java.io.Reader&nbsp;is)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method collects the tag name and all of its attributes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#parseTagContent(com.sun.lwuit.xml.Element, java.io.Reader)">parseTagContent</A></B>(com.sun.lwuit.xml.Element&nbsp;element,
                java.io.Reader&nbsp;is)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parses tags content, accumulating text and child elements .</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#setIncludeWhitespacesBetweenTags(boolean)">setIncludeWhitespacesBetweenTags</A></B>(boolean&nbsp;include)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#setParserCallback(com.sun.lwuit.xml.ParserCallback)">setParserCallback</A></B>(com.sun.lwuit.xml.ParserCallback&nbsp;parserCallback)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the specified callback to serve as the callback for parsing errors</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#shouldEvaluate(com.sun.lwuit.xml.Element)">shouldEvaluate</A></B>(com.sun.lwuit.xml.Element&nbsp;element)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if this element should be evaluated by the parser
 This can be overriden by subclasses to skip certain elements</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#startTag(java.lang.String)">startTag</A></B>(java.lang.String&nbsp;tag)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoked when a tag is opened, this method should return true to process
 the tag or return false to skip the tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/xml/XMLParser.html#textElement(java.lang.String)">textElement</A></B>(java.lang.String&nbsp;text)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoked when the event parser encounters a text element.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="XMLParser()"><!-- --></A><H3>
XMLParser</H3>
<PRE>
public <B>XMLParser</B>()</PRE>
<DL>
<DD>Constructs the XMLParser
<P>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getSupportedStandardName()"><!-- --></A><H3>
getSupportedStandardName</H3>
<PRE>
protected java.lang.String <B>getSupportedStandardName</B>()</PRE>
<DL>
<DD>Returns a string identifying the document type this parser supports.
 This should be overriden by subclassing parsers.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a string identifying the document type this parser supports.</DL>
</DD>
</DL>
<HR>

<A NAME="addCharEntity(java.lang.String, int)"><!-- --></A><H3>
addCharEntity</H3>
<PRE>
public void <B>addCharEntity</B>(java.lang.String&nbsp;symbol,
                          int&nbsp;code)</PRE>
<DL>
<DD>Adds the given symbol and code to the user defined char entities table
 http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>symbol</CODE> - The symbol to add<DD><CODE>code</CODE> - The symbol's code</DL>
</DD>
</DL>
<HR>

<A NAME="addCharEntitiesRange(java.lang.String[], int)"><!-- --></A><H3>
addCharEntitiesRange</H3>
<PRE>
public void <B>addCharEntitiesRange</B>(java.lang.String[]&nbsp;symbols,
                                 int&nbsp;startcode)</PRE>
<DL>
<DD>Adds the given symbols array  to the user defined char entities table with the startcode provided as the code of the first string, startcode+1 for the second etc.
 Some strings in the symbols array may be null thus skipping code numbers.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>symbols</CODE> - The symbols to add<DD><CODE>startcode</CODE> - The symbol's code</DL>
</DD>
</DL>
<HR>

<A NAME="convertCharEntity(java.lang.String)"><!-- --></A><H3>
convertCharEntity</H3>
<PRE>
protected java.lang.String <B>convertCharEntity</B>(java.lang.String&nbsp;charEntity)</PRE>
<DL>
<DD>Converts a char entity to the matching character.
 This handles both numbered and symbol char entities (The latter is done via getCharEntityCode)
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>charEntity</CODE> - The char entity to convert
<DT><B>Returns:</B><DD>A string containing a single char, or the original char entity string (with & and ;) if the char entity couldn't be resolved</DL>
</DD>
</DL>
<HR>

<A NAME="parse(java.io.Reader)"><!-- --></A><H3>
parse</H3>
<PRE>
public com.sun.lwuit.xml.Element <B>parse</B>(java.io.Reader&nbsp;is)</PRE>
<DL>
<DD>This is the entry point for parsing a document and the only non-private member method in this class
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>is</CODE> - The InputStream containing the XML
<DT><B>Returns:</B><DD>an Element object describing the parsed document (Basically its DOM)</DL>
</DD>
</DL>
<HR>

<A NAME="createNewElement(java.lang.String)"><!-- --></A><H3>
createNewElement</H3>
<PRE>
protected com.sun.lwuit.xml.Element <B>createNewElement</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Creates a new element. This should be overriden by parsers that use a subclass of Element.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The new element's name
<DT><B>Returns:</B><DD>a new instance of the element</DL>
</DD>
</DL>
<HR>

<A NAME="createNewTextElement(java.lang.String)"><!-- --></A><H3>
createNewTextElement</H3>
<PRE>
protected com.sun.lwuit.xml.Element <B>createNewTextElement</B>(java.lang.String&nbsp;text)</PRE>
<DL>
<DD>Creates a new text element. This should be overriden by parsers that use a subclass of Element.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>text</CODE> - The new element's text
<DT><B>Returns:</B><DD>a new instance of the element</DL>
</DD>
</DL>
<HR>

<A NAME="setIncludeWhitespacesBetweenTags(boolean)"><!-- --></A><H3>
setIncludeWhitespacesBetweenTags</H3>
<PRE>
public void <B>setIncludeWhitespacesBetweenTags</B>(boolean&nbsp;include)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="eventParser(java.io.Reader)"><!-- --></A><H3>
eventParser</H3>
<PRE>
public void <B>eventParser</B>(java.io.Reader&nbsp;r)
                 throws java.io.IOException</PRE>
<DL>
<DD>The event parser requires deriving this class and overriding callback
 methods to work effectively. To stop the event parser in mid way a
 callback can simply throw an IOException on purpose.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>r</CODE> - the reader from which the data should be parsed
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an exception is thrown by the reader</DL>
</DD>
</DL>
<HR>

<A NAME="textElement(java.lang.String)"><!-- --></A><H3>
textElement</H3>
<PRE>
protected void <B>textElement</B>(java.lang.String&nbsp;text)</PRE>
<DL>
<DD>Invoked when the event parser encounters a text element.
 This callback method is invoked only on the eventParser.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>text</CODE> - the text encountered</DL>
</DD>
</DL>
<HR>

<A NAME="startTag(java.lang.String)"><!-- --></A><H3>
startTag</H3>
<PRE>
protected boolean <B>startTag</B>(java.lang.String&nbsp;tag)</PRE>
<DL>
<DD>Invoked when a tag is opened, this method should return true to process
 the tag or return false to skip the tag.
 This callback method is invoked only on the eventParser.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tag</CODE> - the tag name
<DT><B>Returns:</B><DD>true to process the tag, false to skip the tag</DL>
</DD>
</DL>
<HR>

<A NAME="endTag(java.lang.String)"><!-- --></A><H3>
endTag</H3>
<PRE>
protected void <B>endTag</B>(java.lang.String&nbsp;tag)</PRE>
<DL>
<DD>Invoked when a tag ends
 This callback method is invoked only on the eventParser.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tag</CODE> - the tag name</DL>
</DD>
</DL>
<HR>

<A NAME="attribute(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
attribute</H3>
<PRE>
protected void <B>attribute</B>(java.lang.String&nbsp;tag,
                         java.lang.String&nbsp;attributeName,
                         java.lang.String&nbsp;value)</PRE>
<DL>
<DD>Invoked for every attribute value of the givne tag
 This callback method is invoked only on the eventParser.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tag</CODE> - the tag name</DL>
</DD>
</DL>
<HR>

<A NAME="parseTagContent(com.sun.lwuit.xml.Element, java.io.Reader)"><!-- --></A><H3>
parseTagContent</H3>
<PRE>
protected void <B>parseTagContent</B>(com.sun.lwuit.xml.Element&nbsp;element,
                               java.io.Reader&nbsp;is)
                        throws java.io.IOException</PRE>
<DL>
<DD>Parses tags content, accumulating text and child elements .
 Upon bumping a start tag character it calls the parseTag method.
 This method is called at first from the parse method, and later on from parseTag (which creates the recursion).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> - The current parent element<DD><CODE>is</CODE> - The InputStream containing the XML
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error in the stream is encountered</DL>
</DD>
</DL>
<HR>

<A NAME="isWhiteSpace(char)"><!-- --></A><H3>
isWhiteSpace</H3>
<PRE>
protected boolean <B>isWhiteSpace</B>(char&nbsp;ch)</PRE>
<DL>
<DD>Checks if the specified character is a white space or not.
 Exposed to packaage since used by HTMLComponent as well
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - The character to check
<DT><B>Returns:</B><DD>true if the character is a white space, false otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="parseTag(java.io.Reader)"><!-- --></A><H3>
parseTag</H3>
<PRE>
protected com.sun.lwuit.xml.Element <B>parseTag</B>(java.io.Reader&nbsp;is)
                                      throws java.io.IOException</PRE>
<DL>
<DD>This method collects the tag name and all of its attributes.
 For comments and XML declarations this will call the parseCommentOrXMLDeclaration method.
 Note that this method returns an Element with a name and attrbutes, but not its content/children which will be done by parseTagContent
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>is</CODE> - The InputStream containing the XML
<DT><B>Returns:</B><DD>The parsed element
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error in the stream is encountered</DL>
</DD>
</DL>
<HR>

<A NAME="parseCommentOrXMLDeclaration(java.io.Reader, java.lang.String)"><!-- --></A><H3>
parseCommentOrXMLDeclaration</H3>
<PRE>
protected com.sun.lwuit.xml.Element <B>parseCommentOrXMLDeclaration</B>(java.io.Reader&nbsp;is,
                                                                 java.lang.String&nbsp;endTag)
                                                          throws java.io.IOException</PRE>
<DL>
<DD>This utility method is used to parse comments and XML declarations in the XML.
 The comment/declaration is returned as an Element, but is flagged as a comment since both comments and XML declarations are not part of the XML DOM.
 This method can be overridden to process specific XML declarations
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>is</CODE> - The inputstream<DD><CODE>endTag</CODE> - The endtag to look for
<DT><B>Returns:</B><DD>An Element representing the comment or XML declartaion
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="isEmptyTag(java.lang.String)"><!-- --></A><H3>
isEmptyTag</H3>
<PRE>
protected boolean <B>isEmptyTag</B>(java.lang.String&nbsp;tagName)</PRE>
<DL>
<DD>Checks whether the specified tag is an empty tag
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tagName</CODE> - The tag name to check
<DT><B>Returns:</B><DD>true if that tag is defined as an empty tag, false otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="notifyError(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
notifyError</H3>
<PRE>
protected void <B>notifyError</B>(int&nbsp;errorId,
                           java.lang.String&nbsp;tag,
                           java.lang.String&nbsp;attribute,
                           java.lang.String&nbsp;value,
                           java.lang.String&nbsp;description)</PRE>
<DL>
<DD>A utility method used to notify an error to the ParserCallback and throw an IllegalArgumentException if parsingError returned false
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>errorId</CODE> - The error ID, one of the ERROR_* constants in ParserCallback<DD><CODE>tag</CODE> - The tag in which the error occured (Can be null for non-tag related errors)<DD><CODE>attribute</CODE> - The attribute in which the error occured (Can be null for non-attribute related errors)<DD><CODE>value</CODE> - The value in which the error occured (Can be null for non-value related errors)<DD><CODE>description</CODE> - A verbal description of the error
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - If the parser callback returned false on this error</DL>
</DD>
</DL>
<HR>

<A NAME="isSupported(com.sun.lwuit.xml.Element)"><!-- --></A><H3>
isSupported</H3>
<PRE>
protected boolean <B>isSupported</B>(com.sun.lwuit.xml.Element&nbsp;element)</PRE>
<DL>
<DD>Returns true if this element is supported, false otherwise
 In XMLParser this always returns true, but subclasses can determine if an element is supported in their context according to its name etc.
 Unsupported elements will be skipped by the parser and excluded from the resulting DOM object
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> - The element to check
<DT><B>Returns:</B><DD>true if the element is supported, false otherwise</DL>
</DD>
</DL>
<HR>

<A NAME="shouldEvaluate(com.sun.lwuit.xml.Element)"><!-- --></A><H3>
shouldEvaluate</H3>
<PRE>
protected boolean <B>shouldEvaluate</B>(com.sun.lwuit.xml.Element&nbsp;element)</PRE>
<DL>
<DD>Checks if this element should be evaluated by the parser
 This can be overriden by subclasses to skip certain elements
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> - The element to check
<DT><B>Returns:</B><DD>true if this element should be evaluated by the parser, false to skip it completely</DL>
</DD>
</DL>
<HR>

<A NAME="setParserCallback(com.sun.lwuit.xml.ParserCallback)"><!-- --></A><H3>
setParserCallback</H3>
<PRE>
public void <B>setParserCallback</B>(com.sun.lwuit.xml.ParserCallback&nbsp;parserCallback)</PRE>
<DL>
<DD>Sets the specified callback to serve as the callback for parsing errors
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>parserCallback</CODE> - The callback to use for parsing errors</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/XMLParser.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/sun/lwuit/xml/XMLParser.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="XMLParser.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>
